-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linear implementation of Frechet distance #1199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small change request from me, for the purposes of maintainability.
Oh and if you could contrive a test that fails using the old algorithm but passes now, that would be useful… |
That would be tricky to do, because we would need to generate a huge route, store it somewhere so that it can be accessed locally and on CI to run tests. If you have suggestions or prior examples on how to do this as part of this repo (not sure if you already use git lfs, or have other tests that read from test resources, eg |
Ah, in that case probably not worth the hassle. |
27a9118
to
a81943c
Compare
I can create a deterministic test where we generate two very big |
If you have time / capacity, that would be great. |
a81943c
to
204547e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll leave this open for another day or so in case anyone else wants to chime in.
CHANGES.md
if knowledge of this change could be valuable to users.This PR is due to the fact that when using the
frechet_distance
methods on our tools with long routes (200km+) we were not able to run it due tofatal runtime error: stack overflow
.This patch includes a new linear implementation (inspired from here) that removes recursion and allows to avoid the stack overflow fatal errors, while improving overall performances (~70% faster when testing 1000 10km-long routes).